package com.ruoyi.project.treat.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.framework.web.domain.BaseEntity;

import java.util.Date;
import java.util.Objects;
/**
 * 患者表 treat_patient
 *
 * @author ruoyi
 */
public class TreatPatient extends BaseEntity {
    private Long patientId;
    private String patientName;
    private String patientPhone;
    private String patientIdnum;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date patientBirth;
    private Integer patientAge;
    private String patientSex;
    private String patientStatus;
    private String patientAddress;
    private String patientHistory;

    public TreatPatient() {
    }

    public TreatPatient(Long patientId, String patientName, String patientPhone, String patientIdnum, Date patientBirth, Integer patientAge, String patientSex, String patientStatus, String patientAddress, String patientHistory) {
        this.patientId = patientId;
        this.patientName = patientName;
        this.patientPhone = patientPhone;
        this.patientIdnum = patientIdnum;
        this.patientBirth = patientBirth;
        this.patientAge = patientAge;
        this.patientSex = patientSex;
        this.patientStatus = patientStatus;
        this.patientAddress = patientAddress;
        this.patientHistory = patientHistory;
    }

    public Long getPatientId() {
        return patientId;
    }

    public void setPatientId(Long patientId) {
        this.patientId = patientId;
    }

    public String getPatientName() {
        return patientName;
    }

    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }

    public String getPatientPhone() {
        return patientPhone;
    }

    public void setPatientPhone(String patientPhone) {
        this.patientPhone = patientPhone;
    }

    public String getPatientIdnum() {
        return patientIdnum;
    }

    public void setPatientIdnum(String patientIdnum) {
        this.patientIdnum = patientIdnum;
    }

    public Date getPatientBirth() {
        return patientBirth;
    }

    public void setPatientBirth(Date patientBirth) {
        this.patientBirth = patientBirth;
    }

    public Integer getPatientAge() {
        return patientAge;
    }

    public void setPatientAge(Integer patientAge) {
        this.patientAge = patientAge;
    }

    public String getPatientSex() {
        return patientSex;
    }

    public void setPatientSex(String patientSex) {
        this.patientSex = patientSex;
    }

    public String getPatientStatus() {
        return patientStatus;
    }

    public void setPatientStatus(String patientStatus) {
        this.patientStatus = patientStatus;
    }

    public String getPatientAddress() {
        return patientAddress;
    }

    public void setPatientAddress(String patientAddress) {
        this.patientAddress = patientAddress;
    }

    public String getPatientHistory() {
        return patientHistory;
    }

    public void setPatientHistory(String patientHistory) {
        this.patientHistory = patientHistory;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TreatPatient that = (TreatPatient) o;
        return Objects.equals(patientId, that.patientId) &&
                Objects.equals(patientName, that.patientName) &&
                Objects.equals(patientPhone, that.patientPhone) &&
                Objects.equals(patientIdnum, that.patientIdnum) &&
                Objects.equals(patientBirth, that.patientBirth) &&
                Objects.equals(patientAge, that.patientAge) &&
                Objects.equals(patientSex, that.patientSex) &&
                Objects.equals(patientStatus, that.patientStatus) &&
                Objects.equals(patientAddress, that.patientAddress) &&
                Objects.equals(patientHistory, that.patientHistory);
    }

    @Override
    public int hashCode() {
        return Objects.hash(patientId, patientName, patientPhone, patientIdnum, patientBirth, patientAge, patientSex, patientStatus, patientAddress, patientHistory);
    }

    @Override
    public String toString() {
        return "TreatPatient{" +
                "patientId=" + patientId +
                ", patientName='" + patientName + '\'' +
                ", patientPhone='" + patientPhone + '\'' +
                ", patientIdnum='" + patientIdnum + '\'' +
                ", patientBirth=" + patientBirth +
                ", patientAge=" + patientAge +
                ", patientSex='" + patientSex + '\'' +
                ", patientStatus='" + patientStatus + '\'' +
                ", patientAddress='" + patientAddress + '\'' +
                ", patientHistory='" + patientHistory + '\'' +
                '}';
    }
}
